Optimal. Leaf size=85 \[ -\frac{2 \sin ^7(c+d x)}{7 a^2 d}+\frac{\sin ^5(c+d x)}{a^2 d}-\frac{4 \sin ^3(c+d x)}{3 a^2 d}+\frac{\sin (c+d x)}{a^2 d}+\frac{2 i \cos ^7(c+d x)}{7 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.185731, antiderivative size = 85, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 7, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.226, Rules used = {3092, 3090, 2633, 2565, 30, 2564, 270} \[ -\frac{2 \sin ^7(c+d x)}{7 a^2 d}+\frac{\sin ^5(c+d x)}{a^2 d}-\frac{4 \sin ^3(c+d x)}{3 a^2 d}+\frac{\sin (c+d x)}{a^2 d}+\frac{2 i \cos ^7(c+d x)}{7 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3092
Rule 3090
Rule 2633
Rule 2565
Rule 30
Rule 2564
Rule 270
Rubi steps
\begin{align*} \int \frac{\cos ^5(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx &=-\frac{\int \cos ^5(c+d x) (i a \cos (c+d x)+a \sin (c+d x))^2 \, dx}{a^4}\\ &=-\frac{\int \left (-a^2 \cos ^7(c+d x)+2 i a^2 \cos ^6(c+d x) \sin (c+d x)+a^2 \cos ^5(c+d x) \sin ^2(c+d x)\right ) \, dx}{a^4}\\ &=-\frac{(2 i) \int \cos ^6(c+d x) \sin (c+d x) \, dx}{a^2}+\frac{\int \cos ^7(c+d x) \, dx}{a^2}-\frac{\int \cos ^5(c+d x) \sin ^2(c+d x) \, dx}{a^2}\\ &=\frac{(2 i) \operatorname{Subst}\left (\int x^6 \, dx,x,\cos (c+d x)\right )}{a^2 d}-\frac{\operatorname{Subst}\left (\int x^2 \left (1-x^2\right )^2 \, dx,x,\sin (c+d x)\right )}{a^2 d}-\frac{\operatorname{Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (c+d x)\right )}{a^2 d}\\ &=\frac{2 i \cos ^7(c+d x)}{7 a^2 d}+\frac{\sin (c+d x)}{a^2 d}-\frac{\sin ^3(c+d x)}{a^2 d}+\frac{3 \sin ^5(c+d x)}{5 a^2 d}-\frac{\sin ^7(c+d x)}{7 a^2 d}-\frac{\operatorname{Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sin (c+d x)\right )}{a^2 d}\\ &=\frac{2 i \cos ^7(c+d x)}{7 a^2 d}+\frac{\sin (c+d x)}{a^2 d}-\frac{4 \sin ^3(c+d x)}{3 a^2 d}+\frac{\sin ^5(c+d x)}{a^2 d}-\frac{2 \sin ^7(c+d x)}{7 a^2 d}\\ \end{align*}
Mathematica [A] time = 0.103847, size = 149, normalized size = 1.75 \[ \frac{15 \sin (c+d x)}{32 a^2 d}+\frac{11 \sin (3 (c+d x))}{96 a^2 d}+\frac{\sin (5 (c+d x))}{32 a^2 d}+\frac{\sin (7 (c+d x))}{224 a^2 d}+\frac{5 i \cos (c+d x)}{32 a^2 d}+\frac{3 i \cos (3 (c+d x))}{32 a^2 d}+\frac{i \cos (5 (c+d x))}{32 a^2 d}+\frac{i \cos (7 (c+d x))}{224 a^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.138, size = 174, normalized size = 2.1 \begin{align*} 2\,{\frac{1}{d{a}^{2}} \left ({\frac{i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{6}}}-{\frac{5/2\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{4}}}+{\frac{{\frac{23\,i}{16}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{2}}}-2/7\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-7}+2\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-5}-{\frac{55}{24\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{3}}}+{\frac{13}{16\,\tan \left ( 1/2\,dx+c/2 \right ) -16\,i}}-{\frac{i/16}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{2}}}-1/24\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{-3}+3/16\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{-1} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.469126, size = 244, normalized size = 2.87 \begin{align*} \frac{{\left (-7 i \, e^{\left (10 i \, d x + 10 i \, c\right )} - 105 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 210 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 70 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 21 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-7 i \, d x - 7 i \, c\right )}}{672 \, a^{2} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.81458, size = 233, normalized size = 2.74 \begin{align*} \begin{cases} \frac{\left (- 176160768 i a^{10} d^{5} e^{19 i c} e^{3 i d x} - 2642411520 i a^{10} d^{5} e^{17 i c} e^{i d x} + 5284823040 i a^{10} d^{5} e^{15 i c} e^{- i d x} + 1761607680 i a^{10} d^{5} e^{13 i c} e^{- 3 i d x} + 528482304 i a^{10} d^{5} e^{11 i c} e^{- 5 i d x} + 75497472 i a^{10} d^{5} e^{9 i c} e^{- 7 i d x}\right ) e^{- 16 i c}}{16911433728 a^{12} d^{6}} & \text{for}\: 16911433728 a^{12} d^{6} e^{16 i c} \neq 0 \\\frac{x \left (e^{10 i c} + 5 e^{8 i c} + 10 e^{6 i c} + 10 e^{4 i c} + 5 e^{2 i c} + 1\right ) e^{- 7 i c}}{32 a^{2}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11403, size = 196, normalized size = 2.31 \begin{align*} \frac{\frac{7 \,{\left (9 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 15 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 8\right )}}{a^{2}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right )}^{3}} + \frac{273 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} - 1155 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 2450 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 2870 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 2037 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 791 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 152}{a^{2}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{7}}}{168 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]